<template>
  <el-menu :default-openeds="['1', '3']" style="min-height: 100%;overflow-x: hidden"
           background-color="rgb(48,65,86)"
           text-color="#ffff"
           active-text-color="#ffd04b"
           :collapse-transition="false"
           :collapse="isCollapse"
            router
  >
    <div style="height: 60px;line-height: 60px;text-align: center">
      <img src="../../assets/logo.png" style="width: 20px; position: relative; top: 5px; margin-right: 5px">
      <b style="color: white" v-show="logoTextShow">健康管理系统</b>
    </div>
    <el-menu-item :index="'/user/'+ userName">
      <template slot="title"><i class="el-icon-house"></i>
        <span slot="title">首页</span>
      </template>
    </el-menu-item>
<!--    <el-menu-item :index="'/user/show/'+ userName">
      <template slot="title"><i class="el-icon-s-promotion"></i>
        <span slot="title">帖子广场</span>
      </template>
    </el-menu-item>-->
    <el-menu-item :index="'/user/myself/'+ userName">
      <template slot="title"><i class="el-icon-user-solid"></i>
        <span slot="title">我的资料</span>
      </template>
    </el-menu-item>
<!--    <el-submenu index="/">
      <template slot="title"><i class="el-icon-menu"></i>
        <span slot="title">发帖</span>
      </template>
      <el-menu-item-group>
        <template slot="title">发帖</template>
        <el-menu-item :index="'/user/submit/canteen/'+userName"><i class="el-icon-s-custom"></i>
          <span>校园食堂</span>
        </el-menu-item>
        <el-menu-item :index="'/user/submit/leisure/'+userName"><i class="el-icon-s-custom"></i>
          <span>校园休闲</span>
        </el-menu-item>
        <el-menu-item :index="'/user/submit/rent/'+userName"><i class="el-icon-s-custom"></i>
          <span>校园租赁</span>
        </el-menu-item>
        <el-menu-item :index="'/user/submit/news/'+userName"><i class="el-icon-s-custom"></i>
          <span>校园新闻</span>
        </el-menu-item>
        <el-menu-item :index="'/user/submit/help/'+userName"><i class="el-icon-s-custom"></i>
          <span>校友互助</span>
        </el-menu-item>
      </el-menu-item-group>
    </el-submenu>-->
  </el-menu>
</template>

<script>
export default {
  // eslint-disable-next-line vue/multi-word-component-names
  name: 'Aside',
  props: {
    isCollapse: Boolean,
    logoTextShow: Boolean,
    userName: String
  }
}
</script>
<style scoped></style>
